//
//  NYWrongBottomTableCellModel.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/5.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYWrongBottomTableCellModel.h"
#import "NYWrongBottomTableCell.h"
@implementation NYWrongBottomTableCellModel
- (Class)cellClass
{
        return [NYWrongBottomTableCell class];
}

//===========================================================
// + (BOOL)automaticallyNotifiesObserversForKey:
//
//===========================================================
+ (BOOL)automaticallyNotifiesObserversForKey: (NSString *)theKey
{
        BOOL automatic;
        NYWrongBottomTableCellModel *model = nil;
        if ([theKey isEqualToString:@keypath(model,offset)]) {
                automatic = NO;
        } else if ([theKey isEqualToString:@keypath(model,contentSize)]) {
                automatic = NO;
        } else {
                automatic = [super automaticallyNotifiesObserversForKey:theKey];
        }
        
        return automatic;
}

//===========================================================
// - setOffset:
//===========================================================
- (void)setOffset:(CGFloat)anOffset
{
        if (_offset != anOffset)
        {
                [self willChangeValueForKey:@keypath(self,offset)];
                _offset = anOffset;
                [self didChangeValueForKey:@keypath(self,offset)];
        }
}
//===========================================================
// - setContentSize:
//===========================================================
- (void)setContentSize:(CGSize)aContentSize
{
        if ( !CGSizeEqualToSize(_contentSize, aContentSize))
        {
                [self willChangeValueForKey:@keypath(self,contentSize)];
                _contentSize = aContentSize;
                [self didChangeValueForKey:@keypath(self,contentSize)];
        }
}
@end
